import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [

    {path: '/',
        name: 'home',
        meta: {
            navigationStyle: 'custom',
            navigationBarTitleText: '首页'
        },
        component: () => import(/* webpackChunkName: "about" */ '../views/home.vue'),
        children:[
            {path: '/home1',
            name: 'home1',
            meta: {
                navigationStyle: 'custom',
                navigationBarTitleText: '首页'
            },
            component: () => import(/* webpackChunkName: "about" */ '../views/home1.vue')
        }
        ]
    },
  
]

export const router = new VueRouter({
    mode: 'history',
    // base: process.env.BASE_URL,
    routes
})
export const createRouter = () => {
    return new VueRouter({
        mode: 'history',
        // base: process.env.BASE_URL,
        routes
    })
}
